import request from '@/utils/request'

// 查询供应商订单处理记录列表
export function listOrderfilerecord(query) {
  return request({
    url: '/bulkegg/orderfilerecord/list',
    method: 'get',
    params: query
  })
}

// 查询供应商订单处理记录详细
export function getOrderfilerecord(id) {
  return request({
    url: '/bulkegg/orderfilerecord/' + id,
    method: 'get'
  })
}

// 新增供应商订单处理记录
export function addOrderfilerecord(data) {
  return request({
    url: '/bulkegg/orderfilerecord',
    method: 'post',
    data: data
  })
}

// 修改供应商订单处理记录
export function updateOrderfilerecord(data) {
  return request({
    url: '/bulkegg/orderfilerecord',
    method: 'put',
    data: data
  })
}

// 删除供应商订单处理记录
export function delOrderfilerecord(id) {
  return request({
    url: '/bulkegg/orderfilerecord/' + id,
    method: 'delete'
  })
}

export function uploadZip(data) {
  return request({
    url: '/bulkegg/orderfilerecord/uploadZip',
    method: 'post',
    data
  })
}

// 统一下载 ZIP
export function downloadZip(fileName) {
  return request({
    url: '/bulkegg/orderfilerecord/downloadZip',
    method: 'get',
    params: { fileName },
    responseType: 'blob'
  })
}
